<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" %>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="aj4" %>


	<f:view>  		 
				<rich:panel style="width:500">
					<f:facet name="header">
						<h:outputLabel value="Adicionar Usuário" id="lblResourcePanel" />
					</f:facet>
					<h:panelGroup>
			 					<h:form>
							      <h:panelGrid columns="6">
				    				<h:outputText value="Nome:" id="lblResourceName" />
									<h:inputText value="#{uiaccountcontrol.inventory.resource.name}" id="txtResourceName">
										<f:validateLength minimum="3" maximum="32" />	
									</h:inputText>
								   <h:message for="txtResourceName" />	
								   
									<h:outputText value="Email:" id="lblResourceEmail" />
									<h:inputText value="#{uiaccountcontrol.inventory.resource.email}" id="txtResourceEmail" >
										<f:validateLength minimum="3" maximum="32" />		
									</h:inputText>
								   <h:message for="txtResourceEmail" />		
									  
				    				<h:outputText value="Login:" id="lblResourceLogin" />
									<h:inputText value="#{uiaccountcontrol.inventory.resource.login}" id="txtResourceLogin" >
										<f:validateLength minimum="3" maximum="32" />	
									</h:inputText>
								   <h:message for="txtResourceLogin" />	
				    				
									<h:outputText value="Senha:" id="lblResourcePassword" />
									<h:inputSecret value="#{uiaccountcontrol.password}" id="txtResourcePassword" >
										<f:validateLength minimum="3" maximum="32" />	
									</h:inputSecret>				    		
								   <h:message for="txtResourcePassword" />
									  		
									<h:outputText value="Confirmação de Senha:" id="lblResourceConfirmPassword" />
									<h:inputSecret value="#{uiaccountcontrol.confirmPassword}" id="txtResourceConfirmPassword" >
										<f:validateLength minimum="3" maximum="32" />										
									</h:inputSecret>				
								   <h:message for="txtResourceConfirmPassword" />
									<h:commandButton value="Adicionar" action="success" actionListener="#{uiaccountcontrol.addResource}"/>

			       				  </h:panelGrid>
								</h:form>
			      </h:panelGroup>
			    </rich:panel>
	</f:view>